<template>
    <div :class="computedClass">
        <slot></slot>
    </div>
</template>

<script>
    export default {
        name: 'am-row',
        props: {
            customClass: String,
            collapse: {
                type: Boolean,
                default: false
            },
            fixed: {
                type: Boolean,
                default: true
            }
        },
        computed: {
            computedClass() {
                const classes = [];

                classes.push('am-g');

                if (this.fixed) {
                    classes.push('am-g-fixed');
                }

                if (this.collapse) {
                    classes.push('am-g-collapse');
                }

                if (this.customClass !== undefined) {
                    classes.push(this.customClass);
                }

                return classes.join(' ');
            }
        }
    };
</script>
